This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.

Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Ctrl+Shift+Enter.

require(iNEXT); packageVersion("iNEXT")
## Loading required package: iNEXT
## [1] '3.0.0'
require(tidyverse); packageVersion("tidyverse")
## Loading required package: tidyverse
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.4.0      ✔ purrr   1.0.1 
## ✔ tibble  3.1.8      ✔ dplyr   1.0.10
## ✔ tidyr   1.3.0      ✔ stringr 1.5.0 
## ✔ readr   2.1.3      ✔ forcats 0.5.2 
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## [1] '1.3.2'
require(tidyr); packageVersion("tidyr")
## [1] '1.3.0'
require(dplyr); packageVersion("dplyr")
## [1] '1.0.10'
require(ggplot2); packageVersion("ggplot2")
## [1] '3.4.0'
require(vegan); packageVersion("vegan")
## Loading required package: vegan
## Loading required package: permute
## Loading required package: lattice
## This is vegan 2.6-4
## [1] '2.6.4'
require(tibble) #for "rownames_to_column('Site')" 
require(reshape2); packageVersion("reshape2")
## Loading required package: reshape2
## 
## Attaching package: 'reshape2'
## 
## The following object is masked from 'package:tidyr':
## 
##     smiths
## [1] '1.4.4'
source("/Users/corahoerstmann/Documents/AWI_ArcticFjords/Code/data_import/import.R", encoding = "UTF-8")

source("/Users/corahoerstmann/Documents/AWI_ArcticFjords/Code/data_import/rename_metadata.R", encoding = "UTF-8")

remove replicates and outliers

outliers arose from crysochromulina bloom (John et al. in prep) and replicates only available from HE533, thus we always used Rep. A from each site.

outliers_euks <- c("HE533.Euk.F02.04C_S9", "HE533.Euk.F02.08B_S20", "HE533.Euk.F02.08C_S21", "HE533.Euk.F02.09A_S22",
              "HE533.Euk.F02.10A_S25", "HE533.Euk.F02.10C_S27", "HE533.Euk.F02.11A_S28", "HE533.Euk.F02.11C_S30",
              "HE533.Euk.F02.12B_S32", "HE533.Euk.F02.12C_S33", "HE533.Euk.F02.19C_S54", "HE533.Euk.F02.22C_S63")

#remove replicates

rep_18S <- c("HE533.Euk.F02.25B_S68", "HE533.Euk.F02.25C_S69", "HE533.Euk.F02.26B_S71", "HE533.Euk.F02.26C_S72", "HE533.Euk.F02.27B_S74", "HE533.Euk.F02.27C_S75", "HE533.Euk.F02.28B_S77", "HE533.Euk.F02.28C_S78",
"HE533.Euk.F02.21B_S59", "HE533.Euk.F02.21C_S60", "HE533.Euk.F02.22B_S62", "HE533.Euk.F02.23B_S65", "HE533.Euk.F02.23C_S66", "HE533.Euk.F02.17B_S47", "HE533.Euk.F02.17C_S48", "HE533.Euk.F02.18B_S50", "HE533.Euk.F02.18C_S51", "HE533.Euk.F02.19B_S53", "HE533.Euk.F02.20B_S56", "HE533.Euk.F02.20C_S57",
"HE533.Euk.F02.13C_S36", "HE533.Euk.F02.14B_S38", "HE533.Euk.F02.14C_S39", "HE533.Euk.F02.15B_S41", "HE533.Euk.F02.15C_S42", "HE533.Euk.F02.16B_S44", "HE533.Euk.F02.16C_S45", "HE533.Euk.F02.07B_S17", "HE533.Euk.F02.07C_S18", "HE533.Euk.F02.09C_S24", "HE533.Euk.F02.04B_S8", "HE533.Euk.F02.05B_S11",
"HE533.Euk.F02.05C_S12", "HE533.Euk.F02.06B_S14", "HE533.Euk.F02.06C_S15", "HE533.Euk.F02.2B_S2", "HE533.Euk.F02.2C_S3", "HE533.Euk.F02.3B_S5", "HE533.Euk.F02.3C_S6")

rep_16S <- c("HE533.Prok.F02.25B_S90",  "HE533.Prok.F02.25C_S91", "HE533.Prok.F02.26B_S94", "HE533.Prok.F02.26C_S95", "HE533.Prok.F02.27B_S98", "HE533.Prok.F02.27C_S99", "HE533.Prok.F02.28B_S102", "HE533.Prok.F02.28C_S103", "HE533.Prok.F02.21B_S78",  "HE533.Prok.F02.21C_S79", "HE533.Prok.F02.22B_S82",  "HE533.Prok.F02.22C_S83", "HE533.Prok.F02.23B_S86", "HE533.Prok.F02.23C_S87", "HE533.Prok.F02.17B_S62", "HE533.Prok.F02.17C_S63", "HE533.Prok.F02.18B_S66",  "HE533.Prok.F02.18C_S67", "HE533.Prok.F02.19B_S70",  "HE533.Prok.F02.19C_S71", "HE533.Prok.F02.20B_S74", "HE533.Prok.F02.20C_S75", "HE533.Prok.F02.11B_S38",  "HE533.Prok.F02.11C_S39", "HE533.Prok.F02.12B_S42",  "HE533.Prok.F02.12C_S43", "HE533.Prok.F02.13B_S46", "HE533.Prok.F02.13C_S47", "HE533.Prok.F02.14B_S50", "HE533.Prok.F02.14C_S51", "HE533.Prok.F02.15B_S54",  "HE533.Prok.F02.15C_S55", "HE533.Prok.F02.16B_S58",  "HE533.Prok.F02.16C_S59", "HE533.Prok.F02.10B_S22",  "HE533.Prok.F02.7B_S34",  "HE533.Prok.F02.7C_S23", "HE533.Prok.F02.8B_S26",   "HE533.Prok.F02.8C_S27", "HE533.Prok.F02.2B_S2", "HE533.Prok.F02.2C_S3", "HE533.Prok.F02.3B_S6", "HE533.Prok.F02.3C_S7", "HE533.Prok.F02.4B_S10", "HE533.Prok.F02.4C_S11", "HE533.Prok.F02.5B_S14", "HE533.Prok.F02.5C_S15", "HE533.Prok.F02.6B_S18", "HE533.Prok.F02.6C_S19", "HE533.Prok.F02.9B_S30", "HE533.Prok.F02.9C_S31")

###remove outliers

euk_r <- eukaryotes%>%dplyr::select(!outliers_euks)
euk_r <- euk_r%>%dplyr::select(!rep_18S)
euk_r <- euk_r[rowSums(euk_r)>0,]

prok_r <- prokaryotes%>%dplyr::select(!rep_16S)
prok_r <- prok_r[rowSums(prok_r)>0,]
prokaryotes = prok_r

meta_18S_r <- meta_18S%>%dplyr::filter(Site %in% colnames(euk_r))
meta_16S <- meta_16S%>%dplyr::filter(Site %in% colnames(prokaryotes))
rm(outliers_euks, rep_16S, rep_18S)

import the distance tables of drifters

source("/Users/corahoerstmann/Documents/AWI_ArcticFjords/Code/env_calc/drifter_calc.R", encoding = "UTF-8")
## Loading required package: BBmisc
## 
## Attaching package: 'BBmisc'
## The following objects are masked from 'package:dplyr':
## 
##     coalesce, collapse
## The following object is masked from 'package:base':
## 
##     isFALSE
list_drifter <- sapply(ls(pattern="drifter_"), function(x) get(x), simplify = FALSE)
rm(list = ls(pattern="drifter_"))
rm(info)

metadata removing NAs and z-scoring

## Joining, by = c("Station", "Glacial.influence", "Latitude", "Longitude")

metadata exploration

source("/Users/corahoerstmann/Documents/AWI_ArcticFjords/Code/env_calc/MLD_DK.R", encoding = "UTF-8")
source("/Users/corahoerstmann/Documents/AWI_ArcticFjords/Code/env_calc/MLD_calculations.R", encoding = "UTF-8")

add seasonality (based on sun altitude and azimuth) to the analysis

## Loading required package: suncalc
## Joining, by = c("date", "lat", "lon")
## Loading required package: suncalc
## Joining, by = c("date", "lat", "lon")

create list of metadata

meta_all <- dplyr::inner_join(meta_16S_m, meta_18S_nNA[1:2], by="Station")
meta_all$In.Out <- as.factor(meta_all$In.Out)

meta_all%>%group_by(Fjord2)%>%summarise(min_depth = min(bottom_depth), max_depth = max(bottom_depth))
list_meta <- sapply(ls(pattern="meta_"), function(x) get(x), simplify = FALSE)
rm(list = ls(pattern="meta_"))
## 
##  Kruskal-Wallis rank sum test
## 
## data:  temperature...C. + salinity..psu. + O2umol.l + Fluorometer + PO4_umol.l + NO3_umol.l + Si_umol.l by Bioclimatic_subzone
## Kruskal-Wallis chi-squared = 39.709, df = 3, p-value = 1.228e-08

source("/Users/corahoerstmann/Documents/AWI_ArcticFjords/Code/alpha_div/alpha_diversity.R")

#the following is very intense computing so better to not run it too often
euk_r_alpha <- diversity_iNEXT(euk_r)
## [1] '3.0.0'
prok_alpha <- diversity_iNEXT(prokaryotes)
## [1] '3.0.0'
euk_r_alpha_meta <- left_join(euk_r_alpha, list_meta$meta_18S_r, by = "Site")
prok_alpha_meta <- left_join(prok_alpha, list_meta$meta_16S, by = "Site")

euk_r_alpha_n <- euk_r_alpha_meta%>%
  dplyr::rename(Richness.euk = Richness)%>%
  dplyr::rename(Shannon.euk = Shannon)%>%
  dplyr::rename(Simpson.euk = Simpson)

prok_alpha_n <- prok_alpha_meta%>%
  dplyr::rename(Richness.prok = Richness)%>%
  dplyr::rename(Shannon.prok = Shannon)%>%
  dplyr::rename(Simpson.prok = Simpson)

euk_r_alpha_n$Pielou.euk <- euk_r_alpha_n$Shannon.euk/log(euk_r_alpha_n$Richness.euk)
prok_alpha_n$Pielou.prok <- prok_alpha_n$Shannon.prok/log(prok_alpha_n$Richness.prok)


euk_r_alpha_meta_l <- euk_r_alpha_n%>%gather(Div_indices, Div_value, Richness.euk, Shannon.euk, Simpson.euk, Pielou.euk)
prok_alpha_meta_l <- prok_alpha_n%>%gather(Div_indices, Div_value, Richness.prok, Shannon.prok, Simpson.prok, Pielou.prok)
div_sub <- c("Station", "Glacial.influence","In.Out","Bioclimatic_subzone", "Div_indices", "Div_value")


#REF 4 pielou: https://www.davidzeleny.net/anadat-r/doku.php/en:div-ind



div_alpha_both <- full_join(euk_r_alpha_meta_l[,div_sub], prok_alpha_meta_l[,div_sub])
## Joining, by = c("Station", "Glacial.influence", "In.Out",
## "Bioclimatic_subzone", "Div_indices", "Div_value")
list_div <- sapply(ls(pattern="_alpha"), function(x) get(x), simplify = FALSE)


std <- function(x) sd(x)/sqrt(length(x))

list_div$div_alpha_both%>%filter(Div_indices == "Richness.euk")%>%group_by(Bioclimatic_subzone)%>%summarise(median = median(Div_value),min = min(Div_value), max = max(Div_value), std = std(Div_value), n=n())
list_div$div_alpha_both%>%filter(Div_indices == "Richness.prok")%>%group_by(Bioclimatic_subzone)%>%summarise(median = median(Div_value),min = min(Div_value), max = max(Div_value), std = std(Div_value), n=n())
rm(list = ls(pattern="_alpha"))
source("/Users/corahoerstmann/Documents/AWI_ArcticFjords/Code/data_transformations/z_scoring.R")

alpha diversity boxplots

source("/Users/corahoerstmann/Documents/AWI_ArcticFjords/Code/alpha_div/boxplot_alphadiv.R")
## Warning in wilcox.test.default(div_euk_s_G$Richness.euk,
## div_euk_s_NG$Richness.euk, : cannot compute exact p-value with ties

## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  list_div$euk_r_alpha_n$Richness.euk and list_div$euk_r_alpha_n$Bioclimatic_subzone 
## 
##            high_arctic low_arctic subarctic
## low_arctic 1.0000      -          -        
## subarctic  0.0027      0.7424     -        
## temperate  4.1e-06     5.4e-07    5.3e-13  
## 
## P value adjustment method: bonferroni 
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  list_div$euk_r_alpha_n$Pielou.euk and list_div$euk_r_alpha_n$Bioclimatic_subzone 
## 
##            high_arctic low_arctic subarctic
## low_arctic 1.00000     -          -        
## subarctic  0.47591     1.00000    -        
## temperate  4e-06       0.00099    0.00072  
## 
## P value adjustment method: bonferroni 
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  list_div$prok_alpha_n$Richness.prok and list_div$prok_alpha_n$Bioclimatic_subzone 
## 
##            high_arctic low_arctic subarctic
## low_arctic 1.00        -          -        
## subarctic  < 2e-16     7.2e-10    -        
## temperate  < 2e-16     6.8e-11    0.63     
## 
## P value adjustment method: bonferroni 
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  list_div$prok_alpha_n$Pielou.prok and list_div$prok_alpha_n$Bioclimatic_subzone 
## 
##            high_arctic low_arctic subarctic
## low_arctic 0.0255      -          -        
## subarctic  1.0000      0.0028     -        
## temperate  1.3e-09     2.2e-11    3.0e-08  
## 
## P value adjustment method: bonferroni

data transformations

source("/Users/corahoerstmann/Documents/AWI_ArcticFjords/Code/data_transformations/transformation_CLR_aitchinson.R")

euk_aitchinson <- dczm(euk_r, 1)
## Loading required package: coda.base
## 
## Attaching package: 'coda.base'
## The following object is masked from 'package:stats':
## 
##     dist
## Loading required package: usedist
## No. adjusted imputations:  23430
prok_aitchinson <- dczm(prokaryotes, 1)
## No. adjusted imputations:  21985
#prok_aitchinson_r <- dczm(prok_r, 5)


euk_clr <- clr(euk_r,1)
prok_clr <- clr(prokaryotes, 1)

taxonomy_16S_clr <- taxonomy_16S%>%filter(rownames %in% rownames(prok_clr))
taxonomy_16S_clr$ASV <- taxonomy_16S_clr$rownames

multivariate analysis

RDA

## No. adjusted imputations:  20569
## Call: rda(formula = ASV.clr.t ~ temperature...C. + salinity..psu. +
## PO4_umol.l + NO3_umol.l + altitude + bottom_depth + Si_umol.l, data =
## meta)
## 
##                 Inertia Proportion Rank
## Total         2593.3079     1.0000     
## Constrained   1139.6719     0.4395    7
## Unconstrained 1453.6360     0.5605   85
## Inertia is variance 
## 
## Eigenvalues for constrained axes:
##  RDA1  RDA2  RDA3  RDA4  RDA5  RDA6  RDA7 
## 707.3 166.1 129.7  66.1  39.6  20.0  10.8 
## 
## Eigenvalues for unconstrained axes:
##   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8 
## 390.8 148.7  92.6  79.0  76.9  61.8  49.0  39.3 
## (Showing 8 of 85 unconstrained eigenvalues)
## 
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
## 
##     combine
## Call: rda(formula = ASV.clr.t.sort ~ temperature...C. + salinity..psu.
## + PO4_umol.l + NO3_umol.l + bottom_depth + altitude, data =
## meta.wf.data)
## 
##                 Inertia Proportion Rank
## Total         2593.3079     1.0000     
## Constrained   1105.9357     0.4265    6
## Unconstrained 1487.3723     0.5735   86
## Inertia is variance 
## 
## Eigenvalues for constrained axes:
##  RDA1  RDA2  RDA3  RDA4  RDA5  RDA6 
## 706.6 161.7 129.7  64.1  32.4  11.3 
## 
## Eigenvalues for unconstrained axes:
##   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8 
## 396.8 150.3  95.1  82.8  76.9  63.3  50.9  42.7 
## (Showing 8 of 86 unconstrained eigenvalues)

## Permutation test for rda under reduced model
## Permutation: free
## Number of permutations: 999
## 
## Model: rda(formula = ASV.clr.t.sort ~ temperature...C. + salinity..psu. + PO4_umol.l + NO3_umol.l + bottom_depth + altitude, data = meta.wf.data)
##          Df Variance      F Pr(>F)    
## Model     6   1105.9 10.658  0.001 ***
## Residual 86   1487.4                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## [1] 0.4264575

## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = ASV.ait.t ~ Bioclimatic_subzone, data = meta, method = "jaccard")
##                     Df SumOfSqs      R2      F Pr(>F)    
## Bioclimatic_subzone  3   130524 0.43619 22.951  0.001 ***
## Residual            89   168716 0.56381                  
## Total               92   299240 1.00000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Homogeneity of multivariate dispersions
## 
## Call: betadisper(d = dis, group = meta$Bioclimatic_subzone)
## 
## No. of Positive Eigenvalues: 61
## No. of Negative Eigenvalues: 31
## 
## Average distance to median:
## high_arctic  low_arctic   subarctic   temperate 
##     0.07048     0.05165     0.11178     0.10086 
## 
## Eigenvalues for PCoA axes:
## (Showing 8 of 92 eigenvalues)
##   PCoA1   PCoA2   PCoA3   PCoA4   PCoA5   PCoA6   PCoA7   PCoA8 
## 1.52249 0.86461 0.22034 0.09360 0.06507 0.05557 0.04519 0.02832 
## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = ASV.ait.t ~ Region, data = meta, method = "jaccard")
##          Df SumOfSqs      R2      F Pr(>F)    
## Region    5   146245 0.48872 16.632  0.001 ***
## Residual 87   152995 0.51128                  
## Total    92   299240 1.00000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Homogeneity of multivariate dispersions
## 
## Call: betadisper(d = dis, group = meta$Region)
## 
## No. of Positive Eigenvalues: 61
## No. of Negative Eigenvalues: 31
## 
## Average distance to median:
## East.Greenland        Iceland   North.Norway   South.Norway       Svalbard 
##        0.03183        0.03631        0.10196        0.10086        0.07048 
## West.Greenland 
##        0.05670 
## 
## Eigenvalues for PCoA axes:
## (Showing 8 of 92 eigenvalues)
##   PCoA1   PCoA2   PCoA3   PCoA4   PCoA5   PCoA6   PCoA7   PCoA8 
## 1.52249 0.86461 0.22034 0.09360 0.06507 0.05557 0.04519 0.02832 
## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = ASV.ait.t ~ Fjord, data = meta, method = "jaccard")
##          Df SumOfSqs     R2      F Pr(>F)    
## Fjord    17   215275 0.7194 11.311  0.001 ***
## Residual 75    83965 0.2806                  
## Total    92   299240 1.0000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Homogeneity of multivariate dispersions
## 
## Call: betadisper(d = dis, group = meta$Fjord)
## 
## No. of Positive Eigenvalues: 61
## No. of Negative Eigenvalues: 31
## 
## Average distance to median:
##                   Balsfjord                  Boknafjord 
##                     0.03706                     0.05537 
##                   Disco Bay                     Iceland 
##                     0.05670                     0.03631 
##                     Isfjord                  Kongsfjord 
##                     0.01447                     0.08791 
##                  Laksefjord                     Lofoten 
##                     0.02932                     0.10601 
##                 Lyngenfjord                   Nordfjord 
##                     0.02967                     0.04756 
## Nordvestfjord.Scoresby.Sund           Orust-Tjˆrn.Fjord 
##                     0.03183                     0.05487 
##              Porsangerfjord                  Sognefjord 
##                     0.03184                     0.04248 
##                   Tanafjord             Van.Mijen.Fjord 
##                     0.06507                     0.04194 
##                  Wijdefjord                   Woodfjord 
##                     0.03149                     0.03019 
## 
## Eigenvalues for PCoA axes:
## (Showing 8 of 92 eigenvalues)
##   PCoA1   PCoA2   PCoA3   PCoA4   PCoA5   PCoA6   PCoA7   PCoA8 
## 1.52249 0.86461 0.22034 0.09360 0.06507 0.05557 0.04519 0.02832
## No. adjusted imputations:  19453
## Call: rda(formula = ASV.clr.t ~ Temperature...C. + Salinity..psu. +
## bottom_depth + NO3_umol.l + altitude + MLD + PO4_umol.l + Si_umol.l,
## data = meta)
## 
##                 Inertia Proportion Rank
## Total         3192.1962     1.0000     
## Constrained    977.8773     0.3063    8
## Unconstrained 2214.3189     0.6937   81
## Inertia is variance 
## 
## Eigenvalues for constrained axes:
##  RDA1  RDA2  RDA3  RDA4  RDA5  RDA6  RDA7  RDA8 
## 460.5 179.3 124.4  78.8  52.2  32.7  31.7  18.1 
## 
## Eigenvalues for unconstrained axes:
##   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8 
## 350.1 225.5 147.9 133.8 104.4  87.3  80.4  70.5 
## (Showing 8 of 81 unconstrained eigenvalues)
## Call: rda(formula = ASV.clr.t.sort ~ Temperature...C. + Salinity..psu.
## + Fluorometer + PO4_umol.l + Si_umol.l + NO3_umol.l + bottom_depth +
## altitude, data = meta.wf.data)
## 
##                 Inertia Proportion Rank
## Total         3192.1962     1.0000     
## Constrained    969.0544     0.3036    8
## Unconstrained 2223.1418     0.6964   81
## Inertia is variance 
## 
## Eigenvalues for constrained axes:
##  RDA1  RDA2  RDA3  RDA4  RDA5  RDA6  RDA7  RDA8 
## 461.3 168.8 124.7  77.0  47.8  39.8  29.8  19.8 
## 
## Eigenvalues for unconstrained axes:
##   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8 
## 367.4 226.6 147.5 133.8 100.9  89.7  81.1  68.9 
## (Showing 8 of 81 unconstrained eigenvalues)

## Permutation test for rda under reduced model
## Permutation: free
## Number of permutations: 999
## 
## Model: rda(formula = ASV.clr.t.sort ~ Temperature...C. + Salinity..psu. + Fluorometer + PO4_umol.l + Si_umol.l + NO3_umol.l + bottom_depth + altitude, data = meta.wf.data)
##          Df Variance      F Pr(>F)    
## Model     8   969.05 4.4134  0.001 ***
## Residual 81  2223.14                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## [1] 0.3035698

## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = ASV.ait.t ~ Bioclimatic_subzone, data = meta, method = "jaccard")
##                     Df SumOfSqs      R2      F Pr(>F)    
## Bioclimatic_subzone  3  0.64750 0.44004 22.527  0.001 ***
## Residual            86  0.82397 0.55996                  
## Total               89  1.47148 1.00000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Homogeneity of multivariate dispersions
## 
## Call: betadisper(d = dis, group = meta$Bioclimatic_subzone)
## 
## No. of Positive Eigenvalues: 62
## No. of Negative Eigenvalues: 27
## 
## Average distance to median:
## high_arctic  low_arctic   subarctic   temperate 
##     0.09487     0.09335     0.08179     0.08659 
## 
## Eigenvalues for PCoA axes:
## (Showing 8 of 89 eigenvalues)
##   PCoA1   PCoA2   PCoA3   PCoA4   PCoA5   PCoA6   PCoA7   PCoA8 
## 0.69767 0.31063 0.16793 0.07851 0.03762 0.03701 0.02817 0.01852 
## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = ASV.ait.t ~ Region, data = meta, method = "jaccard")
##          Df SumOfSqs     R2      F Pr(>F)    
## Region    5  0.81254 0.5522 20.716  0.001 ***
## Residual 84  0.65893 0.4478                  
## Total    89  1.47148 1.0000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Homogeneity of multivariate dispersions
## 
## Call: betadisper(d = dis, group = meta$Region)
## 
## No. of Positive Eigenvalues: 62
## No. of Negative Eigenvalues: 27
## 
## Average distance to median:
## East.Greenland        Iceland   North.Norway   South.Norway       Svalbard 
##        0.03000        0.03014        0.06956        0.08659        0.09487 
## West.Greenland 
##        0.04299 
## 
## Eigenvalues for PCoA axes:
## (Showing 8 of 89 eigenvalues)
##   PCoA1   PCoA2   PCoA3   PCoA4   PCoA5   PCoA6   PCoA7   PCoA8 
## 0.69767 0.31063 0.16793 0.07851 0.03762 0.03701 0.02817 0.01852 
## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 999
## 
## adonis2(formula = ASV.ait.t ~ Fjord, data = meta, method = "jaccard")
##          Df SumOfSqs      R2      F Pr(>F)    
## Fjord    17   1.0801 0.73401 11.687  0.001 ***
## Residual 72   0.3914 0.26599                  
## Total    89   1.4715 1.00000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Homogeneity of multivariate dispersions
## 
## Call: betadisper(d = dis, group = meta$Fjord)
## 
## No. of Positive Eigenvalues: 62
## No. of Negative Eigenvalues: 27
## 
## Average distance to median:
##                   Balsfjord                  Boknafjord 
##                     0.02819                     0.03297 
##                   Disco Bay                     Iceland 
##                     0.04299                     0.03014 
##                     Isfjord                  Kongsfjord 
##                     0.08400                     0.08301 
##                  Laksefjord                     Lofoten 
##                     0.02429                     0.07719 
##                 Lyngenfjord                   Nordfjord 
##                     0.03329                     0.04437 
## Nordvestfjord.Scoresby.Sund           Orust-Tjˆrn.Fjord 
##                     0.03000                     0.05833 
##              Porsangerfjord                  Sognefjord 
##                     0.04787                     0.09209 
##                   Tanafjord             Van.Mijen.Fjord 
##                     0.03526                     0.05503 
##                  Wijdefjord                   Woodfjord 
##                     0.04599                     0.05647 
## 
## Eigenvalues for PCoA axes:
## (Showing 8 of 89 eigenvalues)
##   PCoA1   PCoA2   PCoA3   PCoA4   PCoA5   PCoA6   PCoA7   PCoA8 
## 0.69767 0.31063 0.16793 0.07851 0.03762 0.03701 0.02817 0.01852

distance analysis

## Loading required package: metagMisc
## 
## Attaching package: 'metagMisc'
## The following object is masked from 'package:purrr':
## 
##     some
## Loading required package: kmed
## 
## Attaching package: 'kmed'
## The following object is masked from 'package:survival':
## 
##     heart
## Loading required package: energy
## No. adjusted imputations:  1593 
## [1] 45

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## 
##  Pearson's product-moment correlation
## 
## data:  all_16S_c$particle_normalized and all_16S_c$value.x
## t = 2.7584, df = 43, p-value = 0.008497
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1063037 0.6116572
## sample estimates:
##       cor 
## 0.3877387

## No. adjusted imputations:  1593 
## [1] 77

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## 
##  Pearson's product-moment correlation
## 
## data:  all_16S_c$particle_normalized and all_16S_c$value.x
## t = 7.6598, df = 75, p-value = 5.286e-11
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.5149482 0.7719449
## sample estimates:
##       cor 
## 0.6625143

## No. adjusted imputations:  1593 
## [1] 112

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## 
##  Pearson's product-moment correlation
## 
## data:  all_16S_c$particle_normalized and all_16S_c$value.x
## t = 7.2939, df = 110, p-value = 4.93e-11
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.4310631 0.6840374
## sample estimates:
##       cor 
## 0.5709507

## No. adjusted imputations:  1593 
## [1] 150

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## 
##  Pearson's product-moment correlation
## 
## data:  all_16S_c$particle_normalized and all_16S_c$value.x
## t = 5.7104, df = 148, p-value = 5.974e-08
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2839851 0.5478623
## sample estimates:
##       cor 
## 0.4249083

## No. adjusted imputations:  1593 
## [1] 164

## `geom_smooth()` using formula = 'y ~ x'

## `geom_smooth()` using formula = 'y ~ x'

## 
##  Pearson's product-moment correlation
## 
## data:  all_16S_c$particle_normalized and all_16S_c$value.x
## t = 7.044, df = 162, p-value = 5.061e-11
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3574980 0.5934325
## sample estimates:
##       cor 
## 0.4842192

## No. adjusted imputations:  1700 
## [1] 45

## `geom_smooth()` using formula = 'y ~ x'

## 
##  Pearson's product-moment correlation
## 
## data:  all_16S_c$particle_normalized and all_16S_c$value.x
## t = 0.46145, df = 43, p-value = 0.6468
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2280361  0.3563870
## sample estimates:
##        cor 
## 0.07019651

## No. adjusted imputations:  1700 
## [1] 77

## `geom_smooth()` using formula = 'y ~ x'

## 
##  Pearson's product-moment correlation
## 
## data:  all_16S_c$particle_normalized and all_16S_c$value.x
## t = 3.9395, df = 75, p-value = 0.0001815
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2095156 0.5838915
## sample estimates:
##       cor 
## 0.4140636

## No. adjusted imputations:  1700 
## [1] 112

## `geom_smooth()` using formula = 'y ~ x'

## 
##  Pearson's product-moment correlation
## 
## data:  all_16S_c$particle_normalized and all_16S_c$value.x
## t = 6.4767, df = 110, p-value = 2.714e-09
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3765772 0.6478161
## sample estimates:
##       cor 
## 0.5254188

## No. adjusted imputations:  1700 
## [1] 150

## `geom_smooth()` using formula = 'y ~ x'

## 
##  Pearson's product-moment correlation
## 
## data:  all_16S_c$particle_normalized and all_16S_c$value.x
## t = 6.3825, df = 148, p-value = 2.114e-09
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3288029 0.5815460
## sample estimates:
##       cor 
## 0.4645834

## No. adjusted imputations:  1700 
## [1] 164

## `geom_smooth()` using formula = 'y ~ x'

## 
##  Pearson's product-moment correlation
## 
## data:  all_16S_c$particle_normalized and all_16S_c$value.x
## t = 2.6516, df = 162, p-value = 0.008808
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.05233421 0.34637239
## sample estimates:
##       cor 
## 0.2039484

## Loading required package: raster
## Loading required package: sp
## 
## Attaching package: 'sp'
## The following object is masked from 'package:coda.base':
## 
##     coordinates
## 
## Attaching package: 'raster'
## The following object is masked from 'package:MASS':
## 
##     select
## The following object is masked from 'package:dplyr':
## 
##     select
## Loading required package: viridisLite
## No. adjusted imputations:  20569

## 
## Call:
## lm(formula = V1 ~ value, data = SETA)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5.6320 -0.9716  0.0963  1.0560  4.2465 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -7.307642   0.361216  -20.23   <2e-16 ***
## value        0.150038   0.004127   36.35   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.645 on 304 degrees of freedom
## Multiple R-squared:  0.813,  Adjusted R-squared:  0.8124 
## F-statistic:  1321 on 1 and 304 DF,  p-value: < 2.2e-16
## `geom_smooth()` using formula = 'y ~ x'

## 
## Call:
## lm(formula = V1 ~ value, data = SETB)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.9587 -0.7204 -0.1989  0.8046  5.6794 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -3.124755   0.455671  -6.857 1.81e-10 ***
## value        0.089145   0.006569  13.570  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.363 on 147 degrees of freedom
## Multiple R-squared:  0.5561, Adjusted R-squared:  0.5531 
## F-statistic: 184.1 on 1 and 147 DF,  p-value: < 2.2e-16
## `geom_smooth()` using formula = 'y ~ x'

## 
## Call:
## lm(formula = V1 ~ value, data = SETC)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.2852 -1.1285 -0.2510  0.5407  5.9446 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept) -0.72559    0.87060  -0.833  0.40931   
## value        0.05004    0.01788   2.799  0.00771 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.701 on 42 degrees of freedom
## Multiple R-squared:  0.1572, Adjusted R-squared:  0.1372 
## F-statistic: 7.835 on 1 and 42 DF,  p-value: 0.007707
## `geom_smooth()` using formula = 'y ~ x'

## No. adjusted imputations:  19453

## 
## Call:
## lm(formula = V1 ~ value, data = SETA)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -9.4182 -1.8609 -0.6411  1.5712  9.5038 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -4.59194    1.01983  -4.503 9.63e-06 ***
## value        0.12010    0.01211   9.915  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.246 on 299 degrees of freedom
## Multiple R-squared:  0.2474, Adjusted R-squared:  0.2449 
## F-statistic: 98.31 on 1 and 299 DF,  p-value: < 2.2e-16
## `geom_smooth()` using formula = 'y ~ x'

## 
## Call:
## lm(formula = V1 ~ value, data = SETB)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.0621 -1.0204  0.1027  1.0222  6.4127 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -3.79208    0.67834  -5.590 1.06e-07 ***
## value        0.08754    0.00891   9.826  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.571 on 148 degrees of freedom
## Multiple R-squared:  0.3948, Adjusted R-squared:  0.3907 
## F-statistic: 96.54 on 1 and 148 DF,  p-value: < 2.2e-16
## `geom_smooth()` using formula = 'y ~ x'

## 
## Call:
## lm(formula = V1 ~ value, data = SETC)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.9804 -0.8702 -0.1710  0.3455  6.0828 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept) -0.19817    0.80714  -0.246   0.8071  
## value        0.02608    0.01028   2.538   0.0144 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.528 on 49 degrees of freedom
## Multiple R-squared:  0.1162, Adjusted R-squared:  0.09815 
## F-statistic: 6.442 on 1 and 49 DF,  p-value: 0.01438
## `geom_smooth()` using formula = 'y ~ x'

functional co-analysis of prokaryotes and picoeukaryotes and their trophic groups

source("/Users/corahoerstmann/Documents/AWI_ArcticFjords/Code/analysis_network/top_abundant.R")
## Loading required package: NetCoMi
## Loading required package: SpiecEasi
## 
## Attaching package: 'SpiecEasi'
## The following object is masked _by_ '.GlobalEnv':
## 
##     clr
## The following object is masked from 'package:MASS':
## 
##     fitdistr
## 
## Loading required package: igraph
## 
## Attaching package: 'igraph'
## The following object is masked from 'package:SpiecEasi':
## 
##     make_graph
## The following object is masked from 'package:raster':
## 
##     union
## The following object is masked from 'package:BBmisc':
## 
##     normalize
## The following object is masked from 'package:vegan':
## 
##     diversity
## The following object is masked from 'package:permute':
## 
##     permute
## The following objects are masked from 'package:dplyr':
## 
##     as_data_frame, groups, union
## The following objects are masked from 'package:purrr':
## 
##     compose, simplify
## The following object is masked from 'package:tidyr':
## 
##     crossing
## The following object is masked from 'package:tibble':
## 
##     as_data_frame
## The following objects are masked from 'package:stats':
## 
##     decompose, spectrum
## The following object is masked from 'package:base':
## 
##     union
## Loading required package: qgraph
## Loading required package: limma
## 
## Attaching package: 'limma'
## The following object is masked from 'package:BBmisc':
## 
##     printHead
## Loading required package: fantaxtic
## Warning in Bioclimatic_subzone == c("high_arctic", "low_arctic"): longer object
## length is not a multiple of shorter object length
##    Bioclimatic_subzone_B tax_rank     taxid    abundance   Tax_1.x
## 1                 Arctic        5      ASV3 2.295080e+12  Bacteria
## 2                 Arctic       10     ASV11 1.432178e+12  Bacteria
## 3                 Arctic        7     ASV12 1.591738e+12  Bacteria
## 4                 Arctic        1     ASV14 7.017594e+12  Bacteria
## 5              Temperate        9     ASV41 4.155330e+12  Bacteria
## 6              Subarctic        6     ASV86 3.459788e+12  Bacteria
## 7              Temperate        5     ASV86 6.014654e+12  Bacteria
## 8              Temperate        7    ASV101 5.397365e+12  Bacteria
## 9              Subarctic        2    ASV168 8.671690e+12  Bacteria
## 10             Temperate        4    ASV168 6.129200e+12  Bacteria
## 11             Subarctic        8    ASV185 3.154669e+12  Bacteria
## 12             Subarctic       10    ASV197 2.992544e+12  Bacteria
## 13             Temperate        6    ASV207 5.474159e+12  Bacteria
## 14             Subarctic        3    ASV397 8.102563e+12  Bacteria
## 15             Temperate        8    ASV397 4.221519e+12  Bacteria
## 16             Subarctic        7    ASV444 3.244443e+12  Bacteria
## 17             Temperate       10    ASV603 3.933225e+12  Bacteria
## 18                Arctic        4    >ASV_6 2.534052e+12 Eukaryota
## 19             Subarctic        5    >ASV_8 3.571373e+12 Eukaryota
## 20             Temperate        1    >ASV_8 1.741606e+13 Eukaryota
## 21                Arctic        3   >ASV_17 5.029885e+12 Eukaryota
## 22                Arctic        9   >ASV_23 1.464549e+12 Eukaryota
## 23                Arctic        8   >ASV_39 1.509809e+12 Eukaryota
## 24                Arctic        2  >ASV_122 5.530982e+12 Eukaryota
## 25             Subarctic        4  >ASV_122 5.501693e+12 Eukaryota
## 26             Temperate        3  >ASV_122 7.498668e+12 Eukaryota
## 27             Subarctic        9  >ASV_147 3.116342e+12 Eukaryota
## 28             Subarctic        1  >ASV_155 3.185160e+13 Eukaryota
## 29             Temperate        2  >ASV_253 9.191767e+12 Eukaryota
## 30                Arctic        6 >ASV_1290 1.826876e+12 Eukaryota
##            Tax_2.x             Tax_3.x               Tax_4.x
## 1   Proteobacteria Alphaproteobacteria       Rhodobacterales
## 2   Proteobacteria Gammaproteobacteria       Cellvibrionales
## 3   Proteobacteria Gammaproteobacteria           SAR86 clade
## 4    Bacteroidetes         Bacteroidia      Flavobacteriales
## 5   Proteobacteria Gammaproteobacteria           Vibrionales
## 6    Bacteroidetes         Bacteroidia      Flavobacteriales
## 7    Bacteroidetes         Bacteroidia      Flavobacteriales
## 8    Bacteroidetes         Bacteroidia      Flavobacteriales
## 9   Proteobacteria Gammaproteobacteria Betaproteobacteriales
## 10  Proteobacteria Gammaproteobacteria Betaproteobacteriales
## 11  Proteobacteria Deltaproteobacteria     Bdellovibrionales
## 12   Bacteroidetes         Bacteroidia      Flavobacteriales
## 13  Proteobacteria Gammaproteobacteria       Alteromonadales
## 14 Verrucomicrobia    Verrucomicrobiae            Opitutales
## 15 Verrucomicrobia    Verrucomicrobiae            Opitutales
## 16  Planctomycetes    Planctomycetacia          Pirellulales
## 17  Proteobacteria Deltaproteobacteria     Bdellovibrionales
## 18  Archaeplastida         Chlorophyta       Mamiellophyceae
## 19   Stramenopiles          Ochrophyta       Bacillariophyta
## 20   Stramenopiles          Ochrophyta       Bacillariophyta
## 21       Alveolata      Dinoflagellata           Dinophyceae
## 22   Stramenopiles          Ochrophyta         Bolidophyceae
## 23   Stramenopiles                <NA>                  <NA>
## 24   Stramenopiles          Ochrophyta         Chrysophyceae
## 25   Stramenopiles          Ochrophyta         Chrysophyceae
## 26   Stramenopiles          Ochrophyta         Chrysophyceae
## 27       Alveolata      Dinoflagellata                  <NA>
## 28       Alveolata      Dinoflagellata           Syndiniales
## 29            <NA>                <NA>                  <NA>
## 30    Opisthokonta    Choanoflagellida     Choanoflagellatea
##                Tax_5.x Tax_6.x   Tax_1.y         Tax_2.y             Tax_3.y
## 1     Rhodobacteraceae    <NA>  Bacteria  Proteobacteria Alphaproteobacteria
## 2       Porticoccaceae    <NA>  Bacteria  Proteobacteria Gammaproteobacteria
## 3                  g__    <NA>  Bacteria  Proteobacteria Gammaproteobacteria
## 4    Flavobacteriaceae    <NA>  Bacteria   Bacteroidetes         Bacteroidia
## 5         Vibrionaceae    <NA>  Bacteria  Proteobacteria Gammaproteobacteria
## 6    Crocinitomicaceae    <NA>  Bacteria   Bacteroidetes         Bacteroidia
## 7    Crocinitomicaceae    <NA>  Bacteria   Bacteroidetes         Bacteroidia
## 8     NS9 marine group    <NA>  Bacteria   Bacteroidetes         Bacteroidia
## 9     Burkholderiaceae    <NA>  Bacteria  Proteobacteria Gammaproteobacteria
## 10    Burkholderiaceae    <NA>  Bacteria  Proteobacteria Gammaproteobacteria
## 11  Bacteriovoracaceae    <NA>  Bacteria  Proteobacteria Deltaproteobacteria
## 12    NS7 marine group    <NA>  Bacteria   Bacteroidetes         Bacteroidia
## 13       Colwelliaceae    <NA>  Bacteria  Proteobacteria Gammaproteobacteria
## 14    Puniceicoccaceae    <NA>  Bacteria Verrucomicrobia    Verrucomicrobiae
## 15    Puniceicoccaceae    <NA>  Bacteria Verrucomicrobia    Verrucomicrobiae
## 16       Pirellulaceae    <NA>  Bacteria  Planctomycetes    Planctomycetacia
## 17  Bdellovibrionaceae    <NA>  Bacteria  Proteobacteria Deltaproteobacteria
## 18         Mamiellales    <NA> Eukaryota  Archaeplastida         Chlorophyta
## 19   Bacillariophyta_X    <NA> Eukaryota   Stramenopiles          Ochrophyta
## 20   Bacillariophyta_X    <NA> Eukaryota   Stramenopiles          Ochrophyta
## 21       Dinophyceae_X    <NA> Eukaryota       Alveolata      Dinoflagellata
## 22            Parmales    <NA> Eukaryota   Stramenopiles          Ochrophyta
## 23                 g__    <NA> Eukaryota   Stramenopiles                <NA>
## 24     Chrysophyceae_X    <NA> Eukaryota   Stramenopiles          Ochrophyta
## 25     Chrysophyceae_X    <NA> Eukaryota   Stramenopiles          Ochrophyta
## 26     Chrysophyceae_X    <NA> Eukaryota   Stramenopiles          Ochrophyta
## 27                 g__    <NA> Eukaryota       Alveolata      Dinoflagellata
## 28       Dino-Group-II    <NA> Eukaryota       Alveolata      Dinoflagellata
## 29                 g__    <NA> Eukaryota            <NA>                <NA>
## 30 Choanoflagellatea_X    <NA> Eukaryota    Opisthokonta    Choanoflagellida
##                  Tax_4.y             Tax_5.y                     Tax_6.y
## 1        Rhodobacterales    Rhodobacteraceae                 Amylibacter
## 2        Cellvibrionales      Porticoccaceae                 SAR92 clade
## 3            SAR86 clade                 g__                         f__
## 4       Flavobacteriales   Flavobacteriaceae            NS4 marine group
## 5            Vibrionales        Vibrionaceae                      Vibrio
## 6       Flavobacteriales   Crocinitomicaceae                  Fluviicola
## 7       Flavobacteriales   Crocinitomicaceae                  Fluviicola
## 8       Flavobacteriales    NS9 marine group                         f__
## 9  Betaproteobacteriales    Burkholderiaceae           RS62 marine group
## 10 Betaproteobacteriales    Burkholderiaceae           RS62 marine group
## 11     Bdellovibrionales  Bacteriovoracaceae                Peredibacter
## 12      Flavobacteriales    NS7 marine group                         f__
## 13       Alteromonadales       Colwelliaceae                   Colwellia
## 14            Opitutales    Puniceicoccaceae        MB11C04 marine group
## 15            Opitutales    Puniceicoccaceae        MB11C04 marine group
## 16          Pirellulales       Pirellulaceae             Blastopirellula
## 17     Bdellovibrionales  Bdellovibrionaceae                  OM27 clade
## 18       Mamiellophyceae         Mamiellales                Mamiellaceae
## 19       Bacillariophyta   Bacillariophyta_X  Polar-centric-Mediophyceae
## 20       Bacillariophyta   Bacillariophyta_X  Polar-centric-Mediophyceae
## 21           Dinophyceae       Dinophyceae_X              Dinophyceae_XX
## 22         Bolidophyceae            Parmales                  Parmales_X
## 23                  <NA>                 g__                         f__
## 24         Chrysophyceae     Chrysophyceae_X       Chrysophyceae_Clade-F
## 25         Chrysophyceae     Chrysophyceae_X       Chrysophyceae_Clade-F
## 26         Chrysophyceae     Chrysophyceae_X       Chrysophyceae_Clade-F
## 27                  <NA>                 g__                         f__
## 28           Syndiniales       Dino-Group-II      Dino-Group-II-Clade-16
## 29                  <NA>                 g__                         f__
## 30     Choanoflagellatea Choanoflagellatea_X Choanoflagellatea_X_Group_L
##     trophy X
## 1      het  
## 2      het  
## 3      het  
## 4      het  
## 5      het  
## 6      het  
## 7      het  
## 8      het  
## 9      het  
## 10     het  
## 11     het  
## 12     het  
## 13     het  
## 14     het  
## 15     het  
## 16     het  
## 17     het  
## 18    auto  
## 19    auto  
## 20    auto  
## 21 unknown  
## 22    auto  
## 23 unknown  
## 24    mixo  
## 25    mixo  
## 26    mixo  
## 27 unknown  
## 28     het  
## 29 unknown  
## 30     het
## `summarise()` has grouped output by 'Sample'. You can override using the
## `.groups` argument.

##                       Df    Sum Sq Mean Sq F value   Pr(>F)    
## Bioclimatic_subzone_B  2 0.0006399 3.2e-04   29.04 1.66e-09 ***
## Residuals             59 0.0006500 1.1e-05                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##                       Df  Sum Sq  Mean Sq F value   Pr(>F)    
## Bioclimatic_subzone_B  2 0.02637 0.013184   16.22 2.43e-06 ***
## Residuals             59 0.04795 0.000813                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##                       Df   Sum Sq   Mean Sq F value   Pr(>F)    
## Bioclimatic_subzone_B  2 0.006317 0.0031584   27.59 3.48e-09 ***
## Residuals             59 0.006755 0.0001145                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##                       Df Sum Sq Mean Sq F value   Pr(>F)    
## Bioclimatic_subzone_B  2 0.6203 0.31015   32.73 2.74e-10 ***
## Residuals             59 0.5591 0.00948                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##                       Df   Sum Sq  Mean Sq F value   Pr(>F)    
## Bioclimatic_subzone_B  2 0.006982 0.003491   32.62 2.88e-10 ***
## Residuals             59 0.006314 0.000107                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##                       Df    Sum Sq Mean Sq F value   Pr(>F)    
## Bioclimatic_subzone_B  2 0.0006399 3.2e-04   29.04 1.66e-09 ***
## Residuals             59 0.0006500 1.1e-05                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  sTATS2$`Bacteria auto` and sTATS2$Bioclimatic_subzone_B 
## 
##           Arctic  Subarctic
## Subarctic 0.0021  -        
## Temperate 1.5e-09 4.7e-06  
## 
## P value adjustment method: bonferroni 
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  sTATS2$`Eukaryota auto` and sTATS2$Bioclimatic_subzone_B 
## 
##           Arctic  Subarctic
## Subarctic 1.2e-06 -        
## Temperate 0.0011  0.3151   
## 
## P value adjustment method: bonferroni 
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  sTATS2$`Eukaryota mixo` and sTATS2$Bioclimatic_subzone_B 
## 
##           Arctic  Subarctic
## Subarctic 1.6e-09 -        
## Temperate 9.3e-05 0.029    
## 
## P value adjustment method: bonferroni 
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  sTATS2$`Bacteria het` and sTATS2$Bioclimatic_subzone_B 
## 
##           Arctic  Subarctic
## Subarctic 3e-10   -        
## Temperate 0.00172 0.00023  
## 
## P value adjustment method: bonferroni 
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  sTATS2$`Archaea het` and sTATS2$Bioclimatic_subzone_B 
## 
##           Arctic  Subarctic
## Subarctic 1.1e-08 -        
## Temperate 0.49    3.2e-07  
## 
## P value adjustment method: bonferroni 
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  sTATS2$`Eukaryota het` and sTATS2$Bioclimatic_subzone_B 
## 
##           Arctic  Subarctic
## Subarctic 6.6e-09 -        
## Temperate 0.13    4.6e-06  
## 
## P value adjustment method: bonferroni